/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package formulagraph.lineas;

import formulagraph.Colores;

/**
 *
 * @author soler4888
 */
public class Discontinua extends Linea {

    private int intervalo;

    public Discontinua(int intervalo) {
        super();
        this.intervalo = intervalo;
    }

    public Discontinua(int intervalo, Colores colorLinea, double anchuraLinea, ExtremosLinea extremoLinea) {
        super(colorLinea, anchuraLinea, extremoLinea);
        this.intervalo = intervalo;
    }

    @Override
    public String dibujar() {
        return "stroke=\"" + colorLinea.name() + "\" stroke-width=\""
                + anchuraLinea + "\" stroke-linecap=\"" + extremoLinea.name()
                + "\" stroke-dasharray=\"" + intervalo + "," + intervalo + "\"";
    }
}
